package com.wfm;

import org.springframework.beans.BeansException;
import org.springframework.beans.PropertyValues;
import org.springframework.beans.factory.*;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessor;
import org.springframework.lang.Nullable;
import org.springframework.stereotype.Component;

import java.beans.PropertyDescriptor;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

@Component
public class LifeCycleTest {
    String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        System.out.println("setName");
        this.name = name;
    }

    LifeCycleTest() {
      System.out.println("LifeCycleTest构造器");
   }



   @PostConstruct
   public void init() {
      System.out.println("@PostConstruct");
   }
   @PreDestroy
    public void destroy() {
      System.out.println("@PreDestroy");
   }



}
